var obj_init_width;
var obj_init_height;
// body.js-ben:
// var mouse_init_x;
// var mouse_init_y;
// var resizedobj = null;

function start_resize( obj, event ) {
	resizedobj = obj.parentNode;
	obj_init_width = parseInt(resizedobj.style.width);	// parseInt() sring-bol int-et csinal
	obj_init_height = parseInt(resizedobj.style.height);
	mouse_init_x = event.clientX;
	mouse_init_y = event.clientY;
}

function stop_resize() {
	// azert itt allitom be, hogy resize kozben ne menjen ki az eger alol a BOX_resize div
	frame_position_set( resizedobj );
	
	resizedobj = null;
}

function switch_resize( obj, event ) {
	if( resizedobj ) {
		stop_resize( obj );
	} else {
		start_resize( obj, event );
	}
}

function resize( event ) {
	if( 0 < obj_init_width + (event.clientX - mouse_init_x) ) {
		resizedobj.style.width = (obj_init_width + (event.clientX - mouse_init_x)) + "px";
	}
	if(0 < obj_init_height + (event.clientY - mouse_init_y)) {
		resizedobj.style.height = (obj_init_height + (event.clientY - mouse_init_y)) + "px";
	}
}